package cn.dakaqi.services.user;

import cn.dakaqi.entities.user.Volunteer;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by chunyang on 2016/4/13.
 */
public interface VolunteerService
{
    Volunteer saveVolunteer(Volunteer volunteer)throws ServiceRuntimeException;
    void updateVolunteer(Volunteer volunteer)throws ServiceRuntimeException;
    void updateVolunteer(String jsonData)throws ServiceRuntimeException;
    void updateVolunteer(Volunteer tempVolunteer, Volunteer targetVolunteer)throws ServiceRuntimeException;
    void updatePortrait(String param)throws ServiceRuntimeException;
    void updatePortrait(String memberCode, String url)throws ServiceRuntimeException;
    Volunteer findByVolunteerCode(String volunteerCode) throws ServiceRuntimeException;
    Volunteer findByMemberCode(String memberCode)throws ServiceRuntimeException;
    Volunteer findByUserId(Long userId) throws ServiceRuntimeException;
    Volunteer findOne(Long id) throws ServiceRuntimeException;
    Page<Volunteer> findByLocked(int locked, Pageable pageRequest)throws ServiceRuntimeException;
    void updateMobile(String oldMobile, String newMobile);
    Volunteer findByCardNO(String cardNO)throws ServiceRuntimeException;
    void saveVolunteer(Volunteer volunteer, String groupCode)throws ServiceRuntimeException;
}
